<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
 <%@ page   import="digital.store.tutorial.springmvc.model.ShoppingCart" %>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
 <%@ page   import="java.util.*" %>
 <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
	<table width="100%" border="1" cellpadding="2" cellspacing="0">
	<c:forEach items="${products}" var="product">
		<tr>
			<td><img src="<c:url value="/images/${product.img1}"/>" /></td>
			
			<td><p><c:out value="${product.name}"/></p> 
				<p><c:out value="${product.fulldescription}"/></p>
			</td>          
			<td>
				<p>Color : <c:out value="${product.color}"/></p>
				<p>Model : <c:out value="${product.model}"/></p>
			</td>
			<td><p><c:out value="${product.price}"/></p>		 
			</td>
		</tr>
	</c:forEach>
	</table>
	<p>Total : <c:out value="${total}"/> </p>
	<div class="span-12 last">	
		<form:form modelAttribute="customer" action="save" method="post">
		  	<fieldset>		
				<legend>Customer information</legend>
				<p>
					<form:label	for="email" path="email" cssErrorClass="error">Email</form:label>
					<form:input path="email" /> <form:errors path="email" />			
				</p>
				<p>
					<form:label	for="fullname" path="fullname" cssErrorClass="error">Full Name</form:label>
					<form:input path="fullname" /> <form:errors path="fullname" />			
				</p>
				<p>
					<form:label	for="company" path="company" cssErrorClass="error">Company</form:label>
					<form:input path="company" /> <form:errors path="company" />			
				</p>
				<p>
					<form:label	for="address" path="address" cssErrorClass="error">Address</form:label>
					<form:input path="address" /> <form:errors path="address" />			
				</p>
				<p>
					<form:label	for="mphone" path="mphone" cssErrorClass="error">Mobile Phone</form:label>
					<form:input path="mphone" /> <form:errors path="mphone" />			
				</p>
				<p class="save">	
                    <input type="hidden" name="id" value="${customer.id}" />
					<input type="submit" value="Save"/>
				</p>
			</fieldset>
		</form:form>
	</div>
</body>
</html>